package com.hmall.common.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Description TODO
 * @Author fang
 * @Date 2023-06-06 21:35
 */
@FeignClient("userservice")
public interface UserClient {

    /**
     * 根据id获取用户地址详情
     * @param id
     * @return
     */
    @GetMapping("/address/{id}")
    public Address findAddressById(@PathVariable("id") Long id);

    /**
     * 根据id获取用户信息
     * @param id
     * @return
     */
    @GetMapping("/user/{id}")
    public User findById(@PathVariable Long id);
}
